package cn.rui.service.impl;

import cn.rui.mapper.ErrorLogMapper;
import cn.rui.pojo.ErrorLog;
import cn.rui.service.ErrorLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author 徽州大都督
 * @date 2021/05/18
 */
@Service
@Transactional
public class ErrorLogServiceImpl implements ErrorLogService {

    @Autowired
    private ErrorLogMapper errorLogMapper;

    @Override
    @Async("asyncThreadPoolTaskExecutor")  //异步调用
    public void save(ErrorLog errorLog) {
        errorLogMapper.insert (errorLog);
    }
}
